﻿<UserControl x:Class="ControleRepresentanteSync.View.Pedido.AttributeListView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:Pedido="clr-namespace:ControleRepresentanteSync.Application.Pedido">
	<UserControl.Resources>
        <DataTemplate x:Key="attributeValue" DataType="{x:Type Pedido:IAttributeItem}">
            <TextBox Text="{Binding Path=Value, UpdateSourceTrigger=PropertyChanged}" />
        </DataTemplate>
    </UserControl.Resources>
	<ListView ItemsSource="{Binding Path=Attributes}" SelectionMode="Single">
        <ListView.View>
            <GridView x:Name="Columns">
                <GridViewColumn Header="Nome" DisplayMemberBinding="{Binding Path=Name}" />
                <GridViewColumn Header="Valor" CellTemplate="{StaticResource attributeValue}" />
            </GridView>
        </ListView.View>
    </ListView>
</UserControl>
